<html>
<head>
{literal}
<style> 
body {
	font-family: Calibri;
	font-size: 14px;
}

table {
	border-top: 1px solid #ccc;
	border-left: 1px solid #ccc;
}
table td, table th {
	border-right: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
}
table th {
	background-color: #ddd;
	font-size: 16px; text-align: left;
}
</style>
{/literal}
</head>
<body>
<a href='http://ninja.com'>Go to NINJA</a>
<br>

{if $tasks_new}
<br>
<h2>New tasks:</h2>
<table width="100%" cellpadding="5" cellspacing="0">
<tr>
	<th colspan=3>
		{foreach name=prj from=$project item=prj}{$prj.name}{if !$smarty.foreach.prj.last}, {/if}{/foreach}
	</th>
</tr>
{foreach from=$tasks_new item=task}
<tr style="background-color: {$task.color}">
	<td>{$task.name}{if ($task.desc!='' and $task.desc!='null')}-- [{$task.desc}]{/if}</td>
	<td>{foreach name=user from=$task.users item=user}{$user.name}{if !$smarty.foreach.user.last}, {/if}{/foreach}</td>
	<td>{$task.date} ({$task.author})</td>
</tr>
{/foreach}
</table>
<br>
{/if}

{if $tasks_updated}
<h2>Updated tasks:</h2>
<table width="100%" cellpadding="5" cellspacing="0">
<tr>
	<th colspan=3>
		{foreach name=prj from=$project item=prj}{$prj.name}{if !$smarty.foreach.prj.last}, {/if}{/foreach}
	</th>
</tr>
{foreach from=$tasks_updated item=task}
<tr style="background-color: {$task.color}">
	<td>{$task.name}{if ($task.desc!='' and $task.desc!='null')}-- [{$task.desc}]{/if}</td>
	<td>{foreach name=user from=$task.users item=user}{$user.name}{if !$smarty.foreach.user.last}, {/if}{/foreach}</td>
	<td>{$task.date} ({$task.author})</td>
</tr>
{/foreach}
</table>
<br>
{/if}

<a href='http://ninja.com'>Go to NINJA</a>
</body>
</html>